cmake_minimum_required(VERSION 3.10)

# 项目信息
project(PL0Compiler LANGUAGES CXX)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 启用调试信息
set(CMAKE_BUILD_TYPE Debug)

# 源代码目录
set(SRC_DIR ${CMAKE_SOURCE_DIR}/src)
set(INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
set(TEST_DIR ${CMAKE_SOURCE_DIR}/test)

# 添加头文件目录
include_directories(${INCLUDE_DIR})

# 搜索源文件
file(GLOB_RECURSE SOURCES ${SRC_DIR}/*.cpp)
file(GLOB_RECURSE TEST_SOURCES ${TEST_DIR}/*.cpp)

# 输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# 主可执行文件
add_executable(PL0Compiler ${SOURCES})
target_include_directories(PL0Compiler PRIVATE ${INCLUDE_DIR})
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
# # 添加测试可执行文件
# add_executable(PL0Tests ${TEST_SOURCES})
# target_include_directories(PL0Tests PRIVATE ${INCLUDE_DIR})
